class Person:
    def __init__(self,name,age):
        self.name = name
        self.age = age
        self.__cardId=None
    #赋值  私有属性赋值
    def set_cardId(self,card):  # 代码中 setXXX默认是赋值
        self.__cardId=card
    #获取封装属性值
    def  get_cardId(self):  # 代码中  getXXX 默认是获取值
        return  self.__cardId
p1=Person('李四',12)
p1.set_cardId('123123123219124912')
print(p1.get_cardId())

